pow.webserver
Class Serveur.IvyEventSource

java.lang.Object
  extended by pow.webserver.Serveur.IvyEventSource
All Implemented Interfaces:
java.lang.Runnable, nl.justobjects.pushlet.core.EventSource
Enclosing class:
Serveur

public static class Serveur.IvyEventSource
extends java.lang.Object
implements nl.justobjects.pushlet.core.EventSource, java.lang.Runnable


Constructor Summary
Serveur.IvyEventSource()
           
 
Method Summary
 void activate()
          Activate the event source.
 void passivate()
          Desactivate the event source.
 void run()
          main loop : listens to the udp channel deciphers the udp message checks if the sender is a new bus or not send the message to database through a fifo turns the ivy message into a pushlet event send the event to web users checks if there are some buses that doesn't send messages anymore removes drone which belonged to dead buses
 void setServletContext(javax.servlet.ServletContext srvCtxt)
          method qui renseigne la source sur la servlet qui l'a appelé modification de la librairie pushlet Pushlet.java EventSource.java EventSourceManager.java
 void stop()
          Desactivate the event source.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Serveur.IvyEventSource

public Serveur.IvyEventSource()
Method Detail

activate

public void activate()
Activate the event source. load configuration, create log and create link to database MySQL ! setServletContext method should be called before activating

Specified by:
activate in interface nl.justobjects.pushlet.core.EventSource
See Also:
class

passivate

public void passivate()
Desactivate the event source.

Specified by:
passivate in interface nl.justobjects.pushlet.core.EventSource

stop

public void stop()
Desactivate the event source.

Specified by:
stop in interface nl.justobjects.pushlet.core.EventSource

run

public void run()
main loop : listens to the udp channel deciphers the udp message checks if the sender is a new bus or not send the message to database through a fifo turns the ivy message into a pushlet event send the event to web users checks if there are some buses that doesn't send messages anymore removes drone which belonged to dead buses

Specified by:
run in interface java.lang.Runnable

setServletContext

public void setServletContext(javax.servlet.ServletContext srvCtxt)
method qui renseigne la source sur la servlet qui l'a appelé modification de la librairie pushlet Pushlet.java EventSource.java EventSourceManager.java

Specified by:
setServletContext in interface nl.justobjects.pushlet.core.EventSource